package metalink.admin;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionSupport;
import model.admin.*;
import vo.*;
import java.util.*;
public class PopulateStudentsList extends ActionSupport{
	ArrayList<StudentDetailsVo> list; 
	HashMap<String,String> hm=new HashMap<String,String>();
	ArrayList<String> arr=new ArrayList<String>();
	public ArrayList<String> getArr() {
		return arr;
	}
	public void setArr(ArrayList<String> arr) {
		this.arr = arr;
	}
	public HashMap<String, String> getHm() {
		return hm;
	}
	public void setHm(HashMap<String, String> hm) {
		this.hm = hm;
	}
	public ArrayList<StudentDetailsVo> getList() {
		return list;
	}
	public void setList(ArrayList<StudentDetailsVo> list) {
		this.list = list;
	}
	public String execute(){
		try {
			PopulateStudentsListMo populate=new PopulateStudentsListMo();
			
			list=populate.populatelist();
			if(list.size()==0){
				addActionError("NO STUDENTS");
				return SUCCESS;
			}
			return SUCCESS;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return ERROR;
		}
		
	}
	

}
